<?php
/**
 * 
 * @authors Gary_zhou
 * @date    2016-06-29 13:12:16
 * @version v1.0.0
 * 将XML数据转换成数组
 */

$share_xml = new DOMDocument();
$share_xml->load('../db/wxShare.xml');

$xml_dom = $share_xml->documentElement;

$data = array();
$dataArray = array();
$temp = array();
$tempData = array();

foreach ($xml_dom->childNodes as $k => $v) {
	$temp = [];
	$tempData = [];
	if ($v->nodeType == 1) {
		foreach ($v->childNodes as $k1 => $v1) {
			if ($v1->nodeType == 1) {
				$temp[] = '"'.$v1->nodeName.'"'.'\|'.'"'.$v1->nodeValue.'"';
				$tempData[] = $v1->nodeValue;
			}
		}

		$data[] = $temp;
		$dataArray[] = $tempData;
	}
}

//var_dump($data);

